
import java.text.SimpleDateFormat;
import java.util.Calendar;



public class Log extends User{

    String tableName;
    String descrtiption;
    String notes;

    public String getDescrtiption() {
        return descrtiption;
    }

    public void setDescrtiption(String descrtiption) {
        this.descrtiption = descrtiption;
    }


    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

//    Конструктор по подразбиране
    public Log(){
        this(23,"Neznam","Configuring slides","I like the slides");
    }
//    Конструктор за общо ползване
    public Log(int id,String tableName,String description,String notes){
        super.id=id;
        this.descrtiption=description;
        this.notes=notes;
        this.tableName=tableName;


    }
//    Копиращ конструктор
    public Log(Log log){
        super.id=log.getId();
        this.tableName=log.getTableName();
        this.descrtiption=log.getDescrtiption();
        this.notes=log.getNotes();
    }

    public static String now(String dateFormat) {
    Calendar cal = Calendar.getInstance();
    SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
    return sdf.format(cal.getTime());
    }


    @Override
    public String toString(){
        return "Извикано на:"+Log.now("dd MMMMM yyyy")+" "+Log.now("h:mm a");
    }

    public String doLog(){
        return toString();
    }


}
